<template>
  <el-menu
    :default-active="active"
    class="el-menu-vertical-demo"
    @select="handleSelect"
    background-color="#1f1f1f"
    text-color="#fff"
    active-text-color="#ffd04b">
    <el-submenu index="1">
      <template slot="title">
        <i class="el-icon-location"></i>
        <span>视频</span>
      </template>
      <el-menu-item index="1-1">文件上传</el-menu-item>
      <el-menu-item index="1-2">观看视频</el-menu-item>
    </el-submenu>
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span>图片</span>
      </template>
      <el-menu-item index="2-1">图片上传</el-menu-item>
      <el-menu-item index="2-2">观看图片</el-menu-item>
    </el-submenu>
    <el-menu-item index="3">
      <i class="el-icon-setting"></i>
      <span slot="title">资源管理</span>
    </el-menu-item>
  </el-menu>
</template>

<script>
export default {
  name: 'WsAside',
  props: {
    active: {
      type: String,
      default: '1'
    }
  },
  data () {
    return {
    }
  },
  methods: {
    handleSelect (index, indexPath) {
      this.$emit('item-select', index, indexPath)
    }
  }
}
</script>
